home *** CD-ROM | disk | FTP | other *** search
- Path: news.staffs.ac.uk!bs47c!cm2bcmr
- From: cm2bcmr@bs47c.staffs.ac.uk (A z r a e l)
- Newsgroups: comp.lang.c
- Subject: Q) GCC C PREPROCESSOR
- Date: 8 Jan 1996 10:14:27 GMT
- Organization: Staffordshire University
- Message-ID: <4cqqq3$6fc@bs33n.staffs.ac.uk>
- NNTP-Posting-Host: bs47c.staffs.ac.uk
- X-Newsreader: TIN [version 1.2 PL2]
-
- Hi,
-
- If you can answer the following gcc preprocessor question, please
- email:-
-
- cm2bcmr@bs47c.staffs.ac.uk
-
-
- I am writing a C preprocessor as part of a university project. I am
- using the gcc compiler version 2.7.0 and Linux.
-
- When the following file is preprocessed by gcc using the -E option:-
-
- #include <stdio.h>
-
- int main(void)
- printf("HELLO, WORLD\n");
- return (0);
- }
-
-
- The following type of output is generated:-
-
- # 1 "hello.c"
- # 1 "/usr/include/stdio.h" 1 3
- # 1 "/usr/include/features.h" 1 3
- # 1 "/usr/include/sys/cdefs.h" 1 3
- # 136 "/usr/include/features.h" 1 3
- # 24 "/usr/include/sys/cdefs.h" 2 3
- # 50 "/usr/include/sys/cdefs.h" 3
- # 100 "/usr/include/sys/cdefs.h" 3
- etc.
-
- Question:-
-
- The first # line is the name of the file being preprocessed. The other
- # lines represent the include files that are used by the program. What
- do the numbers in the # include lines represent? I believe that the
- compiler uses these numbers for error reporting...
-
- Thanx,
-
- Malcolm.
-